<?php
/**
 * Template Name: Home page  sidebar(defl )
 *
 * A custom page template without sidebar.
 *
 * The "Template Name:" bit above allows this to be selectable
 * from a dropdown menu on the edit page screen.
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.0
 */

get_header(); ?>

		
			<?php if(is_front_page() ) { ?>
					<div class="q-slide">
						<?php  if ( function_exists('show_nivo_slider') ) { show_nivo_slider(); } ?>
					</div>
			<?php } ?>
			<div class="line-r1"></div>
			<div class="intro-page">
			<div class="clearfix" id="vnm-program">
					<div class="moduletable_user2">
					<?php
					 $idObj = get_category_by_slug('category-suport'); 
  						$catid = $idObj->term_id;
					query_posts('cat='.$catid.'&showposts=4');
					if (have_posts()) {
					while (have_posts()) { the_post();
					?>
					 <?php $meta_values = get_post_meta($post->ID,'url', $single); ?> 
					<a href="<?php echo $meta_values; ?>" class="nhom_suport">
						<?php echo get_the_post_thumbnail($post->ID, 'full'); ?>
					 </a>
					
					
					<?php
					} // end while loop
					} // end if
					wp_reset_query();
					?>
					</div>
			</div>
			</div>
			<div class="clear"></div>
			<div class="line-r1"></div>
		<div id="container" class="" style="margin: 0px auto ! important; padding: 10px; width: 670px ! important;">
			<div id="content" role="main" style="width:100% !important; margin: 0 auto !important; ">
								
								<div class="tabs">
									   <div class="tab tb1">
									       <input type="radio" id="tab-1" name="tab-group-1" checked>
									       <label for="tab-1">Lịch khai giảng </label>
									       <div class="content">
									           <table>
									       		<tr  style="height: 25px;"  class="text-b"><td>Chương trình</td><td>Ngày khai giảng</td><td>Chi tiết</td></tr>
									           <?php
												 $idObj = get_category_by_slug('lich-khai-giang-1'); 
							  						$catid = $idObj->term_id;
												query_posts('cat='.$catid.'&showposts=6');
												if (have_posts()) {
												while (have_posts()) { the_post();
												?>
												 <?php $meta_values = get_post_meta($post->ID,'url', $single); ?>
												<tr  style="height: 25px;">
												<td><p><a href="<?php echo the_permalink(); ?>" class="lichkhaigiang"><?php echo get_the_title(); ?>
												 </a></p></td>
												 <td>
													<?php $meta_values = get_post_meta($post->ID,'date', $single); ?>
													<?php echo $meta_values; ?>					
												</td><td><a href="<?php echo the_permalink(); ?>" class="lichkhaigiang-chitiet">Chi tiết</td></tr>
												
												<?php
												} // end while loop
												} // end if
												wp_reset_query();
												?>
												
												</table>
									       </div> 
									   </div>
									    
									   <div class="tab tb2">
									       <input type="radio" id="tab-2" name="tab-group-1">
									       <label for="tab-2"><?php
											 $idObj = get_category_by_slug('lich-khai-giang-1'); 
						  						$title1 = $idObj->name;echo $title1;?></label>
									       
									       <div class="content">
									           <table>
									       		<tr style="height: 25px;"  class="text-b"><td>Chương trình</td><td>Ngày khai giảng</td><td>Chi tiết</td></tr>
									           <?php
												 $idObj = get_category_by_slug('lich-khai-giang-1'); 
							  						$catid = $idObj->term_id;
												query_posts('cat='.$catid.'&showposts=6');
												if (have_posts()) {
												while (have_posts()) { the_post();
												?>
												 <?php $meta_values = get_post_meta($post->ID,'url', $single); ?>
												<tr  style="height: 25px;">
												<td><p><a href="<?php echo the_permalink(); ?>" class="lichkhaigiang"><?php echo get_the_title(); ?>
												 </a></p></td>
												 <td>
													<?php $meta_values = get_post_meta($post->ID,'date', $single); ?>
													<?php echo $meta_values; ?>					
												</td><td><a href="<?php echo the_permalink(); ?>" class="lichkhaigiang-chitiet">Chi tiết</td></tr>
												
												<?php
												} // end while loop
												} // end if
												wp_reset_query();
												?>
												
												</table>
									       </div> 
									   </div>
									    
									    <div class="tab tb3">
									       <input type="radio" id="tab-3" name="tab-group-1">
									       <label for="tab-3"><?php
											 $idObj = get_category_by_slug('lich-khai-giang-2'); 
						  						$title1 = $idObj->name;echo $title1;?></label>
									     
									       <div class="content">
									       		<table >
									       		<tr  style="height: 25px;" class="text-b"><td>Chương trình</td><td>Ngày khai giảng</td><td>Chi tiết</td></tr>
									           <?php
												 $idObj = get_category_by_slug('lich-khai-giang-2'); 
							  						$catid = $idObj->term_id;
												query_posts('cat='.$catid.'&showposts=6');
												if (have_posts()) {
												while (have_posts()) { the_post();
												?>
												 <?php $meta_values = get_post_meta($post->ID,'url', $single); ?>
												<tr  style="height: 25px;">
												<td><p><a href="<?php echo the_permalink(); ?>" class="lichkhaigiang"><?php echo get_the_title(); ?>
												 </a></p></td>
												 <td>
													<?php $meta_values = get_post_meta($post->ID,'date', $single); ?>
													<?php echo $meta_values; ?>					
												</td><td><a href="<?php echo the_permalink(); ?>" class="lichkhaigiang-chitiet">Chi tiết</td></tr>
												
												<?php
												} // end while loop
												} // end if
												wp_reset_query();
												?>
												
												</table>
									       </div> 
									   </div>
									   
									   
									   <div class="tab tb4">
									       <input type="radio" id="tab-4" name="tab-group-1">
									       <label for="tab-4"><?php
											 $idObj = get_category_by_slug('lich-khai-giang-3'); 
						  						$title1 = $idObj->name;echo $title1;?></label>
									     
									       <div class="content">
									       		<table>
									       		<tr  style="height: 25px;" class="text-b"><td>Chương trình</td><td>Ngày khai giảng</td><td>Chi tiết</td></tr>
									           <?php
												 $idObj = get_category_by_slug('lich-khai-giang-3'); 
							  						$catid = $idObj->term_id;
												query_posts('cat='.$catid.'&showposts=6');
												if (have_posts()) {
												while (have_posts()) { the_post();
												?>
												 <?php $meta_values = get_post_meta($post->ID,'url', $single); ?>
												<tr  style="height: 25px;">
												<td><p><a href="<?php echo the_permalink(); ?>" class="lichkhaigiang"><?php echo get_the_title(); ?>
												 </a></p></td>
												 <td>
													<?php $meta_values = get_post_meta($post->ID,'date', $single); ?>
													<?php echo $meta_values; ?>					
												</td><td><a href="<?php echo the_permalink(); ?>" class="lichkhaigiang-chitiet">Chi tiết</td></tr>
												
												<?php
												} // end while loop
												} // end if
												wp_reset_query();
												?>
												
												</table>
									       </div> 
									   </div>
									   
									   
									   <div class="tab tb5">
									       <input type="radio" id="tab-5" name="tab-group-1">
									       <label for="tab-5"><?php
											 $idObj = get_category_by_slug('lich-khai-giang-4'); 
						  						$title1 = $idObj->name;echo $title1;?></label>
									     
									       <div class="content">
									       		<table>
									       		<tr  style="height: 25px;" class="text-b"><td >Chương trình</td><td>Ngày khai giảng</td><td>Chi tiết</td></tr>
									           <?php
												 $idObj = get_category_by_slug('lich-khai-giang-4'); 
							  						$catid = $idObj->term_id;
												query_posts('cat='.$catid.'&showposts=6');
												if (have_posts()) {
												while (have_posts()) { the_post();
												?>
												 
												<tr style="height: 25px;">
												<td><p><a href="<?php echo the_permalink(); ?>" class="lichkhaigiang"><?php echo get_the_title(); ?>
												 </a></p></td>
												 <td>
													<?php $meta_values = get_post_meta($post->ID,'date', $single); ?>
													<?php echo $meta_values; ?>					
												</td><td><a href="<?php echo the_permalink(); ?>" class="lichkhaigiang-chitiet">Chi tiết</td></tr>
												
												<?php
												} // end while loop
												} // end if
												wp_reset_query();
												?>
												
												</table>
									       </div> 
									   </div>
									   
									   
								</div>
					<div class="clear"></div>	
					
					<!-- bản tin đào tạo -->		
					<div class="bantindaotao">
						<div class="bantindaotao-title"><?php $idObj = get_category_by_slug('ban-tin-dao-tao'); 
						  						$title1 = $idObj->name;echo $title1;?></div>
						<div class="bantindaotao-content">
												<?php
												 $idObj = get_category_by_slug('ban-tin-dao-tao'); 
							  						$catid = $idObj->term_id;
												query_posts('cat='.$catid.'&showposts=4');
												if (have_posts()) {
												while (have_posts()) { the_post();
												?>
												 
												<div class="bantin-content">
													<div class="bantin-images fleft">
														<?php echo get_the_post_thumbnail($post->ID, 'full'); ?>
													</div>
													<div class="bantin-text fright">
													<p><a href="<?php echo the_permalink(); ?>" class="bantin-title"><?php echo get_the_title(); ?></a></p>
													<?php echo the_excerpt(); ?>	
													</div>			
													<div class="clear"></div>
												</div>
												<?php
												} // end while loop
												} // end if
												wp_reset_query();
												?>
						</div>
					</div>			
								
								
			<?php
			 //get_template_part( 'loop', 'page' );
			?>
			
			</div><!-- #content -->
		</div><!-- #container -->
<?php get_sidebar(); ?>
<div class="clear"></div>
<div class="sukien-hinhanh">
				<!-- Sự Kiện -->	
				<div class="sukien fleft">
						<div class="sukien-title"><?php $idObj = get_category_by_slug('su-kien-binh-luan'); 
						  						$title1 = $idObj->name;echo $title1;?></div>
						<div class="sukien-content">
												<?php
												 $idObj = get_category_by_slug('su-kien-binh-luan'); 
							  						$catid = $idObj->term_id;
												query_posts('cat='.$catid.'&showposts=10');
												if (have_posts()) {
												while (have_posts()) { the_post();
												?>
												<p class="sukien-content"><a href="<?php echo the_permalink(); ?>" class="sukien-title1"><?php echo get_the_title(); ?></a></p>
												<?php
												} // end while loop
												} // end if
												wp_reset_query();
												?>
											
						<div class="chitiet"><a href="<?php echo $category_link; ?>">Xem thêm > </a></div>
						</div>
					</div>	
					<!--Hình ảnh -->	
					<div class="hinhanh fright">
						<div class="hinhanh-title"><?php $idObj = get_category_by_slug('hinh-anh'); 
						  						$title1 = $idObj->name;echo $title1;?></div>
						<div class="hinhanh-content">
												<?php
												 $idObj = get_category_by_slug('hinh-anh'); 
							  						$catid = $idObj->term_id;
												query_posts('cat='.$catid.'&showposts=8');
												if (have_posts()) {
												while (have_posts()) { the_post();
												?>
													<div class="hinhanh-images fleft">
														<a href="<?php echo the_permalink(); ?>"><?php echo get_the_post_thumbnail($post->ID, 'full'); ?></a>
													</div>
												
												<?php
												} // end while loop
												} // end if
												wp_reset_query();
												?>
						<div class="chitiet"><a href="#">Xem thêm > </a></div>
						</div>
					</div>	
</div>
<?php get_footer(); ?>
